<h1>Listing tweeters</h1>

<table>
  <tr>
    <th></th>
    <th>Screen name</th>
    <th>Friends count</th>
    <th>Followers count</th>
    <th>Statuses count</th>
    <th>Created at</th>
  </tr>


<% @tweeters.each { |tweeter| %>
  <tr>
    <td><%= link_to(image_tag(tweeter.profile_image_url), tweeter)%></td>
    <td><%= link_to tweeter.screen_name, tweeter %></td>
    <td><%= tweeter.friends_count %></td>
    <td><%= tweeter.followers_count %></td>
    <td><%= tweeter.statuses_count %></td>
    <td><%= time_ago_in_words  tweeter.created_at %></td>
    <td><%= link_to 'Edit', edit_tweeter_path(tweeter) %></td>
    <td><%= link_to 'Destroy', tweeter, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% } %>
</table>

<br />

<%= link_to 'New tweeter', new_tweeter_path %>